using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using UnityEngine;

public class CoinShopPage : UIPanel
{
    [SerializeField]
    private GameObject mask;
    void Awake()
    {
        UIManager.Instance.AddPanel(PanelId.CoinShop, this);
        Debug.Log("金币面板添加");
    }
    public void GetCoin(int count)
    {
        AdManager.Instance.ShowVideo(
        () =>
        {
            Main.Instance.saveData.ChangeCoin(500);
            ((MainMenuPage)UIManager.Instance.panelList[PanelId.MainMenu]).UpdateInfo();
        }
        );
    }
    public override void Show()
    {
        mask.SetActive(true);
        transform.DOScale(1f, 0.5f).SetEase(Ease.InQuad);
        base.Show();
    }
    public override void Hide()
    {
        mask.SetActive(false);
        transform.DOScale(0f, 0.5f).SetEase(Ease.OutQuad);
        base.Hide();
    }
}
